<?php if (!defined('THINK_PATH')) exit(); /*a:5:{s:57:"D:\WWW\epes/application/admin\view\sys\dict_type\add.html";i:1515988606;s:53:"D:\WWW\epes/application/admin\view\public\header.html";i:1515988606;s:57:"D:\WWW\epes/application/admin\view\public\add_header.html";i:1515988606;s:57:"D:\WWW\epes/application/admin\view\public\add_footer.html";i:1515988606;s:53:"D:\WWW\epes/application/admin\view\public\footer.html";i:1515988606;}*/ ?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title><?php echo cache('site_name'); ?>后台管理系统</title>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="/public/static/admin/favicon.ico">
    <link href="/public/static/admin/assets/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/public/static/admin/assets/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/public/static/admin/assets/css/animate.css" rel="stylesheet">
    <link href="/public/static/admin/assets/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="/public/static/admin/assets/js/plugins/ztree/css/metroStyle/metroStyle.css" rel="stylesheet">
    <link href="/public/static/admin/assets/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/public/static/admin/assets/js/plugins/bootstrap-fileinput/css/fileinput.min.css" rel="stylesheet">
    <link href="/public/static/admin/assets/css/plugins/codemirror/codemirror.css" rel="stylesheet">
    <link href="/public/static/admin/assets/css/plugins/codemirror/ambiance.css" rel="stylesheet">
    <link href="/public/static/admin/assets/js/plugins/bootstrap-table/src/bootstrap-table.css" rel="stylesheet">
    <link href="/public/static/admin/assets/css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="/public/static/admin/assets/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
</head>


<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
<form method="post" class="form-horizontal" action="save" id="layer-form">
    <?php if($data['id']!=''): ?><input type="hidden" value="<?php echo $data['id']; ?>" name="id"><?php endif; ?>
    <!--表单项-->
        
                <div class="form-group">
                    <label class="col-sm-2 control-label">类型名称</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="name" value="<?php echo $data['name']; ?>" >
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">编码</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="code" value="<?php echo $data['code']; ?>" >
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">描述</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="about" value="<?php echo $data['about']; ?>" >
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
    <!--/表单项-->
    <?php echo $html->submit_btn(); ?>
</form>
<input type="hidden" value="<?php echo $data['id']; ?>" id="type_id">
</div>
</div>
</div>
</div>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <!--列表部分-->
            <div id="dict" class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="row common-search" style="margin-top: 10px;margin-bottom: 20px" hidden>
                        <div class="col-sm-12">
                            <form class="form-inline table-form">
                                <!--搜索项-->
                                <div class="form-group">
                                    <input type="text" name="name" placeholder="请输入名称" class="form-control">
                                </div>
                                <!--此处可自定义查询条件-->
                                <!--搜索项-->
                                <?php echo $html->search_btn(); ?>
                            </form>
                        </div>
                    </div>
                    <div  class="toolbar">
                        <?php echo $html->toolbar(); ?>
                        <!--此处可自定义工具栏-->
                        <!--<button class="btn btn-primary btn-sm" type="button"><i class="fa fa-plus"></i> 自定义</button>&nbsp;-->
                    </div>
                    <table class="table table-striped table-hover table-bordered"></table>
                    <input id="tableName" value="" type="hidden">
                </div>
            </div>
        </div>
        <!--/列表部分-->
    </div>
</div>
<!-- 全局js -->
<script src="/public/static/admin/assets/js/jquery.min.js?v=2.1.4"></script>
<script src="/public/static/admin/assets/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/public/static/admin/assets/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/public/static/admin/assets/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

<!-- 自定义js -->
<script src="/public/static/admin/assets/js/hplus.js?v=4.1.0"></script>
<script src="/public/static/admin/assets/js/contabs.js"></script>
<script src="/public/static/admin/loa/js/table.js"></script>

<!-- 第三方插件 -->
<script src="/public/static/admin/assets/js/plugins/pace/pace.min.js"></script>
<script src="/public/static/admin/assets/js/plugins/iCheck/icheck.min.js"></script>
<script src="/public/static/admin/assets/js/plugins/bootstrap-fileinput/js/fileinput.js"></script>
<script src="/public/static/admin/assets/js/plugins/bootstrap-fileinput/js/fileinput_locale_zh.js"></script>
<script src="/public/static/admin/assets/js/plugins/treeview/bootstrap-treeview.js"></script>
<script src="/public/static/admin/assets/js/plugins/ueditor/ueditor.config.js"></script>
<script src="/public/static/admin/assets/js/plugins/ueditor/ueditor.all.min.js"></script>
<script src="/public/static/admin/assets/js/plugins/ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="/public/static/admin/assets/js/plugins/ztree/js/jquery.ztree.core.min.js"></script>
<script src="/public/static/admin/assets/js/plugins/ztree/js/jquery.ztree.excheck.min.js"></script>
<script src="/public/static/admin/assets/js/plugins/codemirror/codemirror.js"></script>
<script src="/public/static/admin/assets/js/plugins/codemirror/mode/javascript/javascript.js"></script>
<script src="/public/static/admin/assets/js/plugins/bootstrap-table/src/bootstrap-table.min.js"></script>
<script src="/public/static/admin/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/public/static/admin/assets/js/plugins/bootstrap-table/src/locale/bootstrap-table-zh-CN.min.js"></script></html>
<script src="/public/static/admin/assets/js/plugins/bootstrap-table/src/extensions/export/bootstrap-table-export.js"></script></html>
<script src="/public/static/admin/assets/js/plugins/tableExport.jquery.plugin/tableExport.min.js"></script></html>
<script src="/public/static/admin/assets/js/jquery.serializejson.min.js"></script>
<script src="/public/static/admin/assets/js/plugins/layer/layer.js"></script>
<script src="/public/static/admin/assets/js/plugins/toastr/toastr.min.js"></script>
<script src="/public/static/admin/assets/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="/install/js/ajaxForm.js"></script>
<script type="text/javascript">
    $(function(){
        //初始化表格
        var tableName="dict";
        initTable({
            name:tableName,
            config:{
                index_url: '/admin/sys.dict/loadData?type_id=<?php echo $data["id"]; ?>',
                add_url: '/admin/sys.dict/add',
                del_url: '/admin/sys.dict/del',
                table: tableName
            },
            columns:[
                {checkbox: true},
                {title: 'ID',field:'id'},
                {title: '字典名称', field: 'name'},
                {title: '编码', field: 'code'},
                {title: '字典值', field: 'val'},
                {title: '描述', field: 'about'},
                {title: '操作', field: 'operate',formatter: function (value, row){
                    var str="";
                    var editUrl="/admin/sys.dict/add?id=" +row.id ;
                    var e = ' <button class="btn btn-primary btn-xs" type="button" onclick="layer_open(\''+editUrl+'\',\'编辑\')"><i class="fa fa-edit"></i> 编辑</button> ';
                    str+=e;
                    var delUrl="/admin/sys.dict/del?id="+row.id;
                    var d = '<button class="btn btn-danger btn-xs" type="button" onclick="table_del(\''+delUrl+'\',\''+tableName+'\');"><i class="fa fa-trash"></i> 删除</button>';
                    str+=d;
                    return str;}}
            ]
        });
    });
</script>